﻿using HarmonyLib;
using JSONClass;
using KBEngine;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
using static UnityEngine.UI.Image;

namespace ncs.lingtian
{
    public partial class LingTianMod
    {
        /// <summary>
        /// 拖动灵田瓶子的slider，触发计算催生速度
        /// </summary>
        [HarmonyPostfix, HarmonyPatch(typeof(Tools), nameof(Tools.CalcLingWuOrTuPoTime))]
        public static void Tools_CalcLingWuOrTuPoTime_Postfix(ref int __result)
        {
            var old = __result;
            __result = (int)Math.Ceiling((float)__result / MainMod.lingWuOrTuPoTime.Value);
            MainMod.Logger.LogInfo($"领悟突破时间：{old}=>{__result}");
        }

    }
}
